package com.cleaningcloud.cld.service.impl;

import java.util.Collections;
import java.util.List;

import com.cleaningcloud.cld.domain.dto.CldWorkplanDetailsDto;
import com.cleaningcloud.cld.domain.vo.CldWorkplanDetailsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cleaningcloud.cld.mapper.CldWorkplanDetailsMapper;
import com.cleaningcloud.cld.domain.CldWorkplanDetails;
import com.cleaningcloud.cld.service.ICldWorkplanDetailsService;

/**
 * 工作计划明细Service业务层处理
 * 
 * @author cleaningcloud
 * @date 2024-11-21
 */
@Service
public class CldWorkplanDetailsServiceImpl implements ICldWorkplanDetailsService 
{
    @Autowired
    private CldWorkplanDetailsMapper cldWorkplanDetailsMapper;

    /**
     * 查询工作计划明细
     * 
     * @param workplanDetailsId 工作计划明细主键
     * @return 工作计划明细
     */
    @Override
    public CldWorkplanDetails selectCldWorkplanDetailsByWorkplanDetailsId(Long workplanDetailsId)
    {
        return cldWorkplanDetailsMapper.selectCldWorkplanDetailsByWorkplanDetailsId(workplanDetailsId);
    }

    /**
     * 查询工作计划明细列表
     * 
     * @param cldWorkplanDetails 工作计划明细
     * @return 工作计划明细
     */
    @Override
    public List<CldWorkplanDetailsVo> selectCldWorkplanDetailsList(CldWorkplanDetailsDto cldWorkplanDetails)
    {
        return cldWorkplanDetailsMapper.selectCldWorkplanDetailsList(cldWorkplanDetails);
    }

    @Override
    public List<CldWorkplanDetailsVo> getWorkPlanDetailsList(Long workplanId) {
        return cldWorkplanDetailsMapper.getCldWorkplanDetailsList(workplanId);
    }

    /**
     * 新增工作计划明细
     * 
     * @param cldWorkplanDetails 工作计划明细
     * @return 结果
     */
    @Override
    public int insertCldWorkplanDetails(CldWorkplanDetails cldWorkplanDetails)
    {
        return cldWorkplanDetailsMapper.insertCldWorkplanDetails(cldWorkplanDetails);
    }

    /**
     * 修改工作计划明细
     * 
     * @param cldWorkplanDetails 工作计划明细
     * @return 结果
     */
    @Override
    public int updateCldWorkplanDetails(CldWorkplanDetails cldWorkplanDetails)
    {
        return cldWorkplanDetailsMapper.updateCldWorkplanDetails(cldWorkplanDetails);
    }

    /**
     * 批量删除工作计划明细
     * 
     * @param workplanDetailsIds 需要删除的工作计划明细主键
     * @return 结果
     */
    @Override
    public int deleteCldWorkplanDetailsByWorkplanDetailsIds(Long[] workplanDetailsIds)
    {
        return cldWorkplanDetailsMapper.deleteCldWorkplanDetailsByWorkplanDetailsIds(workplanDetailsIds);
    }

    /**
     * 删除工作计划明细信息
     * 
     * @param workplanDetailsId 工作计划明细主键
     * @return 结果
     */
    @Override
    public int deleteCldWorkplanDetailsByWorkplanDetailsId(Long workplanDetailsId)
    {
        return cldWorkplanDetailsMapper.deleteCldWorkplanDetailsByWorkplanDetailsId(workplanDetailsId);
    }
}
